 //杜拉格斯斜向上买入
 let buyByDLGS=function(selYear,i,condect,buySell,dates){
			 let item = this.vo(selYear[i]);
			let ls = [];
			let lsd = [];
			for(let idx= 0;idx<i+1;idx++){
				ls.push(selYear[idx]);
				lsd.push(dates[idx]);
			}
			var dg = getdlgs(ls,lsd);
			var ed = parseFloat(dg.list[dg.list.length-1]);
			var ed2 =parseFloat(dg.list[dg.list.length-2]);
			var ed3 =parseFloat(dg.list[dg.list.length-3]);
			 var isBiger =( ed>ed2 && ed2>ed3)
			 if(isBiger && condect.time==0){
				 	return {flag:true,str:"BDLGS\n"};
				 //	this.buyHandle("BDLGS",condect,item,buySell,dates[i]);
			  }
			  	return {flag:false,str:"BDLGS\n"};
			};
			
			function getdlgs(datas,dates){
				var list = [];
				for(var i = 0;i<datas.length;i++){
				  var p = new Point();
				   p.x = i;
					p.y = parseFloat(datas[i][1]);
					list.push(p);
					
				}
				var rs = [];
				var ls2 = DouglasPeucker(list,1,rs);
				rs.push(list[list.length-1]);
				rs.unshift(list[0]);
				rs.sort((p1,p2)=>{
					return p1.x>=p2.x?1:-1;
				});
			
			  let chartData = {};
			  chartData.dates = [];
			  chartData.list = [];
			  
			  for(let j=0;j<rs.length;j++){
				      chartData.dates.push(dates[rs[j].x]);
					  chartData.list.push(datas[rs[j].x][1]);
			  }
				return chartData;
			}